<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
	</style>
</head>

<body>

	<script src="jquery-1.8.3.min.js"></script>
	<script>
	var obj={"a":1,"b":2,"c":3};
	obj = JSON.stringify(obj);
	var storage=window.localStorage;
            //写入a字段
            storage["a"]=1;
            //写入b字段
            storage.a=1;
            //写入c字段
            storage.setItem("c",obj);


            //第一种方法读取
            var a=storage.a;
            //第二种方法读取
            var b=storage["b"];
            //第三种方法读取
            var c=storage.getItem("c");
            c = JSON.parse(c);
            console.log(c)
            //解构赋值
            var {a:q,b:w,c:e} = c;
            console.log(q,w,e);
           
            console.log(w);
	</script>

</body>
</html>